<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script type="text/javascript" src="${webRoot}/js/jquery.js"></script>
	<script type="text/javascript">
	function Ajax(){}
	Ajax.prototype.post=function(url,param,callback){
		$.post(url,param,function(data){
			if(data.success){
				callback(data);
			}else{
				alert(data.message);
			}
		},"json")
	}
	var ajax=new Ajax();
		$(function(){
			$("#taskPermission").click(function(){
				ajax.post("${webRoot}/permission/user/taskPermission.json",{},function(data){
					alert(data.result);
				});
			});
			$("#userJson").click(function(){
				ajax.post("${webRoot}/permission/user/userJson.json",{},function(data){
					alert(data.result);
				});
			});
			
			$("#editRole").click(function(){
				ajax.post("${webRoot}/permission/role/editRole.json",{},function(data){
					alert(data.result);
				});
			});
		})
	</script>
  </head>
  
  <body>
    This is my JSP page. <br>
    <a href="permission/user/login.html">permission/user/login.html</a><br/>
    <a href="permission/user/logout.html">permission/user/logout.html</a><br/>
    <a href="permission/user/addUser.html">permission/user/addUser.html</a><br/>
    <a href="permission/user/editUser.html">permission/user/editUser.html</a><br/>
    <a href="permission/user/userDetail.html">permission/user/userDetail.html</a><br/>
    <div id="taskPermission">taskPermission</div>
    <div id="userJson">userJson</div>
    
    
    <a href="permission/role/roleList.html">permission/role/roleList.html</a><br/>
    <a href="permission/role/roleAdd.html">permission/role/roleAdd.html</a><br/>
    <a href="permission/role/addRole.html">permission/role/addRole.html</a><br/>
    <a href="permission/role/roleEdit.html">permission/role/roleEdit.html</a><br/>
    <a href="permission/role/editRole.html">permission/role/editRole.html</a><br/>
    <div id="editRole">editRole</div>
  </body>
</html>


